<?php

class Core {
	
	var $CI;
	
	public function __construct()
	{	
		$this->CI =& get_instance();
	}	

	// encode url
	public function encode($data)
	{
		return strtr(rtrim(base64_encode($data), '='), '+/', '-_');
	}

	// decode url
	public function decode($base64)
	{
		return base64_decode(strtr($base64, '-_', '+/'));
	}
	
}